<template>
    <div style="width: 100%;height: 100%;position: relative">
        <Spin size="large" fix v-if="Loading"></Spin>

        <Form :label-width="180" :disabled="true">
            <table>
                <tr>
                    <td colspan="2">
                        <Form-item label="家庭人员信息:">
                            <span style="padding-right: 20px">{{information}}</span>
                        </Form-item>
                    </td>
                </tr>
                <tr>
                    <td>
                        <Form-item label="家庭月基础收入金额:" prop="ssca0044">
                            <Input v-model="formValidate.ssca0044" placeholder="请输入家庭月基础收入金额" :disabled="true"
                            />
                        </Form-item>
                    </td>
                    <td>
                        <Form-item label="总保障金额:" prop="ssca0026">
                            <InputNumber :min="0" v-model="formValidate.ssca0026" placeholder="请输入总保障金额"
                                         style="width: 300px"
                            />
                        </Form-item>
                    </td>
                </tr>
                <tr>
                    <td>
                        <Form-item label="家庭人口数:" prop="ssca0051">
                            <Input v-model="formValidate.ssca0051" placeholder="请输入家庭人口数" :disabled="true"
                                   class="input"/>
                        </Form-item>
                    </td>
                    <td>
                        <Form-item label="保障人口数:" prop="ssca0052">
                            <Input v-model="formValidate.ssca0052" placeholder="请输入保障人口数" :disabled="true"
                                   class="input"/>
                        </Form-item>
                    </td>
                </tr>
                <tr >
                    <td style="width: 50%">
                        <Form-item label="开户银行名称:" prop="ssca0009">
                            <c-dict-select v-model="formValidate.ssca0009" dictCode="bankcategory"
                                           :width="300"/>
                        </Form-item>
                    </td>
                    <td v-if="formValidate.ssca0009!='999'">
                        <Form-item label="是否代领:" prop="ssca0082">
                            <Select v-model="formValidate.ssca0082">
                                <Option value="1">是</Option>
                                <Option value="0">否</Option>
                            </Select>
                        </Form-item>
                    </td>
                </tr>
                <tr v-if="formValidate.ssca0009!='999'">
                    <td style="width: 50%">
                        <Form-item label="开户人姓名:" prop="ssca0010">
                            <Input v-model="formValidate.ssca0010" placeholder="请输入开户人姓名"/>
                        </Form-item>
                    </td>
                    <td>
                        <Form-item label="开户人证件号码:" prop="ssca0083">
                            <Input v-model="formValidate.ssca0083" placeholder="请输入开户人证件号码"/>
                        </Form-item>
                    </td>
                </tr>
                <tr v-if="formValidate.ssca0009!='999'">
                    <td style="width: 50%">
                        <Form-item label="银行账号:" prop="ssca0011">
                            <Input v-model="formValidate.ssca0011" placeholder="请输入银行账号"/>
                        </Form-item>
                    </td>
                </tr>
                <tr>
                    <td>
                        <Form-item label="致贫原因:" prop="ssca0013">
                            <c-dict-select v-model="formValidate.ssca0013" dictCode="poorreason" :width="300"/>
                        </Form-item>
                    </td>
                    <td>
                        <Form-item label="申请时间:" prop="ssca0003">
                            <DatePicker type="date" v-model="formValidate.ssca0003" placeholder="请选择申请时间"
                                        class="input" :editable="false"></DatePicker>
                        </Form-item>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <Form-item label="救助申请理由:" prop="ssca0008">
                            <c-text-area v-model="formValidate.ssca0008" :max-length="100" :row=3
                                         placeholder="请填写救助申请理由"/>
                        </Form-item>
                    </td>
                </tr>
            </table>
        </Form>
    </div>

</template>

<script>
    import {getAction, postAction} from '@/api/request'
    import {CommonMixin} from '@/views/common/js/CommonMixin'


    export default {
        name: "application12",
        mixins: [CommonMixin],
        components: {},
        data() {
            return {
                ss12007Id: this.$parent.familyInfo.ss12007Id,
                formValidate: {},
                url: "/api/ac/subsistence/ss12007Service/step12Information",
                information: "",
                Loading: false
            }
        },
        methods: {
            getTab12Infor() {
                this.Loading = true;
                var that = this;
                postAction(that.url, {id: this.ss12007Id}).then((res) => {
                    if (res.data.errcode == 0) {
                        that.information = res.data.data.information;
                        that.formValidate = res.data.data.ss12007;
                        if (that.formValidate.ssca0003) {
                            that.formValidate.ssca0003 = this.DateFormat(res.data.data.ss12007.ssca0003, 'YYYY-MM-DD');
                        }
                    } else {
                        that.$Message.error(res.data.errmsg);
                    }
                }).finally(() => {
                    this.Loading = false;
                });
            },
        },
        created() {
            this.getTab12Infor();
        }
    }
</script>

<style scoped src="@/views/common/css/application12.css">
    /deep/ .ivu-input-number {
        width: 300px;
    }
</style>
